/* 预警监控组件独立样式 */
.warning-monitor {
    padding: 20px;
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    min-height: 100vh;
}

.warning-monitor .el-row {
    margin-bottom: 20px;
}

.warning-monitor .el-col {
    margin-bottom: 20px;
}

.warning-monitor .el-card {
    border-radius: 16px;
    box-shadow: 0 6px 20px 0 rgba(0, 0, 0, 0.12);
    transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
    height: 100%;
    border: none;
    overflow: hidden;
    position: relative;
}

.warning-monitor .el-card:hover {
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.2);
    transform: translateY(-6px) scale(1.03);
}

.warning-monitor .el-card__header {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: white;
    border-radius: 16px 16px 0 0;
    padding: 20px 28px;
    font-weight: 700;
    font-size: 16px;
    position: relative;
    overflow: hidden;
}

.warning-monitor .el-card__header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s;
}

.warning-monitor .el-card:hover .el-card__header::before {
    left: 100%;
}

.warning-monitor .el-card__body {
    padding: 28px;
    height: calc(100% - 80px);
    background: white;
    display: flex;
    flex-direction: column;
}

/* 图表容器样式 - 修复显示问题 */
.warning-monitor .chart-container {
    height: 450px !important;
    width: 100% !important;
    min-height: 450px !important;
    position: relative;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* 爽约率监控特殊样式 */
.warning-monitor .noshow-chart {
    height: 450px !important;
    min-height: 450px !important;
}

/* 资源监控特殊样式 */
.warning-monitor .resource-chart {
    height: 450px !important;
    min-height: 450px !important;
}

/* 预警统计特殊样式 */
.warning-monitor .stats-chart {
    height: 450px !important;
    min-height: 450px !important;
}

/* 强制显示图表 */
.warning-monitor .chart-container canvas {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* 预警列表特殊样式 */
.warning-monitor .alert-list {
    max-height: 450px;
    overflow-y: auto;
    padding: 0;
    flex: 1;
}

.warning-monitor .alert-list::-webkit-scrollbar {
    width: 6px;
}

.warning-monitor .alert-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.warning-monitor .alert-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.warning-monitor .alert-list::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.warning-monitor .alert-item {
    padding: 16px 20px;
    margin-bottom: 12px;
    border-radius: 8px;
    border-left: 4px solid;
    background: #f8f9fa;
    transition: all 0.3s ease;
    cursor: pointer;
}

.warning-monitor .alert-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.warning-monitor .alert-item.danger {
    border-left-color: #f56c6c;
    background: linear-gradient(135deg, #fff5f5 0%, #fef0f0 100%);
}

.warning-monitor .alert-item.warning {
    border-left-color: #e6a23c;
    background: linear-gradient(135deg, #fdf6ec 0%, #fef9f0 100%);
}

.warning-monitor .alert-item.info {
    border-left-color: #409eff;
    background: linear-gradient(135deg, #f0f9ff 0%, #f0f9ff 100%);
}

.warning-monitor .alert-item.success {
    border-left-color: #67c23a;
    background: linear-gradient(135deg, #f0f9ff 0%, #f0f9ff 100%);
}

.warning-monitor .alert-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.warning-monitor .alert-type {
    font-weight: 600;
    color: #303133;
    font-size: 14px;
}

.warning-monitor .alert-time {
    font-size: 12px;
    color: #909399;
}

.warning-monitor .alert-message {
    color: #606266;
    font-size: 13px;
    line-height: 1.4;
    margin-bottom: 12px;
}

.warning-monitor .alert-actions {
    display: flex;
    justify-content: flex-end;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .warning-monitor .chart-container {
        height: 400px !important;
        min-height: 400px !important;
    }

    .warning-monitor .noshow-chart {
        height: 400px !important;
        min-height: 400px !important;
    }

    .warning-monitor .resource-chart {
        height: 400px !important;
        min-height: 400px !important;
    }

    .warning-monitor .stats-chart {
        height: 400px !important;
        min-height: 400px !important;
    }
}

@media (max-width: 768px) {
    .warning-monitor .chart-container {
        height: 350px !important;
        min-height: 350px !important;
    }

    .warning-monitor .noshow-chart {
        height: 350px !important;
        min-height: 350px !important;
    }

    .warning-monitor .resource-chart {
        height: 350px !important;
        min-height: 350px !important;
    }

    .warning-monitor .stats-chart {
        height: 350px !important;
        min-height: 350px !important;
    }

    .warning-monitor .el-card__header {
        padding: 16px 20px;
        font-size: 14px;
    }

    .warning-monitor .el-card__body {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .warning-monitor .chart-container {
        height: 300px !important;
        min-height: 300px !important;
    }

    .warning-monitor .noshow-chart {
        height: 300px !important;
        min-height: 300px !important;
    }

    .warning-monitor .resource-chart {
        height: 300px !important;
        min-height: 300px !important;
    }

    .warning-monitor .stats-chart {
        height: 300px !important;
        min-height: 300px !important;
    }

    .warning-monitor .el-card__header {
        padding: 12px 16px;
        font-size: 13px;
    }

    .warning-monitor .el-card__body {
        padding: 16px;
    }
}

/* 卡片头部样式 */
.warning-monitor .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.warning-monitor .card-header span {
    font-weight: 700;
    font-size: 16px;
}

.warning-monitor .el-button {
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.warning-monitor .el-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 确保图表容器在所有情况下都可见 */
.warning-monitor .el-card__body>div {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.warning-monitor .chart-container {
    flex: 1;
    display: flex !important;
    align-items: center;
    justify-content: center;
}

/* 调试样式 - 确保容器可见 */
.warning-monitor .chart-container::before {
    content: '图表容器';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #999;
    font-size: 12px;
    z-index: -1;
    display: none;
}

.warning-monitor .chart-container:empty::before {
    display: block;
}

/* 动画效果 */
.warning-monitor .el-card {
    animation: bounceInUp 1s ease-out;
}

.warning-monitor .el-card:nth-child(1) {
    animation-delay: 0.1s;
}

.warning-monitor .el-card:nth-child(2) {
    animation-delay: 0.2s;
}

.warning-monitor .el-card:nth-child(3) {
    animation-delay: 0.3s;
}

.warning-monitor .el-card:nth-child(4) {
    animation-delay: 0.4s;
}

@keyframes bounceInUp {
    0% {
        opacity: 0;
        transform: translateY(60px) scale(0.8);
    }

    60% {
        opacity: 1;
        transform: translateY(-10px) scale(1.05);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* 加载状态 */
.warning-monitor .loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    color: #909399;
    flex-direction: column;
}

.warning-monitor .loading .el-icon {
    font-size: 36px;
    margin-bottom: 12px;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

/* 错误状态 */
.warning-monitor .error {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    color: #f56c6c;
    flex-direction: column;
}

.warning-monitor .error .el-icon {
    font-size: 52px;
    margin-bottom: 12px;
}

/* 特殊效果 */
.warning-monitor .el-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.15) 50%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s;
    pointer-events: none;
}

.warning-monitor .el-card:hover::after {
    opacity: 1;
}

/* 预警闪烁效果 */
.warning-monitor .alert-item.danger {
    animation: dangerPulse 2s infinite;
}

@keyframes dangerPulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(245, 108, 108, 0.4);
    }

    50% {
        box-shadow: 0 0 0 10px rgba(245, 108, 108, 0);
    }
}